//
//  KDAutoRequestTool.m
//  WangJingApp
//
//  Created by 魏强 on 17/11/1.
//  Copyright © 2017年 KDTech. All rights reserved.
//

#import "KDAutoRequestTool.h"
#import "KDBaseTool.h"
#import "KDGetSubGroupListParam.h"
#import "KDGetMonitorNewsParam.h"
#import "KDGetSubscribeListResult.h"
@implementation KDAutoRequestTool
+ (void)getAMGroupsWithParam:(KDBaseParam *)param success:(void (^)(KDBaseResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,param.method];
    [KDBaseTool get:url param:param resultClass:[KDBaseResult class] success:success failure:failure];
}

+ (void)getMonitorListWithParam:(KDGetSubGroupListParam *)param success:(void (^)(KDBaseResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,param.method];
    [KDBaseTool get:url param:param resultClass:[KDBaseResult class] success:success failure:failure];
}

+ (void)getMonitorNewsWithParam:(KDGetMonitorNewsParam *)param success:(void (^)(KDGetSubscribeListResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@%@",ServerActionAddr,param.method];
    [KDBaseTool get:url param:param resultClass:[KDGetSubscribeListResult class] success:success failure:failure];
}
@end
